package tgc.edu.exam.entity;

import java.util.UUID;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

import org.springframework.data.annotation.CreatedBy;

import tgc.edu.exam.custom.BaseEntity;

/***
 * 
 * 文件资源管理
 * 
 * @author
 */
@Entity
public class SysFile extends BaseEntity<Integer> {
	/** 文件名称 **/
	private String filename;
	/** 文件类型名称 **/
	private String filetypename;
	/** 文件存放地址 **/
	private String storeaddress;
	/** 图片的uuid **/
	private String uuid;
	/** 资源简介 **/
	private String resourceprofile;
	private TbCurriculum tbCurriculum;

	public String getResourceprofile() {
		return resourceprofile;
	}

	public void setResourceprofile(String resourceprofile) {
		this.resourceprofile = resourceprofile;
	}

	public String getFilename() {
		return filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	public String getFiletypename() {
		return filetypename;
	}

	public void setFiletypename(String filetypename) {
		this.filetypename = filetypename;
	}

	public String getStoreaddress() {
		return storeaddress;
	}

	public void setStoreaddress(String storeaddress) {
		this.storeaddress = storeaddress;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	@ManyToOne
	@CreatedBy
	public TbCurriculum getTbCurriculum() {
		return tbCurriculum;
	}

	public void setTbCurriculum(TbCurriculum tbCurriculum) {
		this.tbCurriculum = tbCurriculum;
	}
	
	@Transient
	public String getKcname() {
		return tbCurriculum==null?null:tbCurriculum.getCourseName();
	}

}
